﻿using System;
using System.Collections.Generic;
using System.Text;

namespace oceanho.webapi.factory.httpCore
{
    /// <summary>
    /// 定义一个响应Josn数据选项枚举
    /// </summary>
    public enum JsonAllowOption : byte
    {
        /// <summary>
        /// 默认,只允许POST
        /// </summary>
        Default = 0,

        /// <summary>
        /// 允许GET
        /// </summary>
        AllowGet = 1,
    }

    /// <summary>
    /// 定义一个允许http请求方法选项的枚举
    /// </summary>
    public enum AllowMethodOption : int
    {
        All = 0,
        Get = 1,
        Post = 2,
        Head = 4,
        Trace = 16,
        Put = 32,
        Delete = 64,
        Options = 128,
        Connect = 256
    }

    /// <summary>
    /// 定义一个MD5加密模式枚举
    /// </summary>
    public enum MD5Mode : byte
    {
        /// <summary>
        /// 默认 16 为 md5 Hash
        /// </summary>
        Default = 0,
        /// <summary>
        /// 加强 32 位 md5 Hash
        /// </summary>
        Strongly = 1,
    }

    #region 文件上传相关 Enum 定义

    /// <summary>
    /// 定义一个文件上传模式枚举（单文件上传/多文件上传）
    /// </summary>
    public enum FileUploadMode : byte
    {
        /// <summary>
        /// 允许多文件上传
        /// </summary>
        Default = 0,

        /// <summary>
        /// 只允许单文件上传
        /// </summary>
        Single = 1,
    }

    /// <summary>
    /// 定义一个文件上传类型校验模式枚举（校验只允许,校验不允许）
    /// </summary>
    public enum FileUploadTypeValidMode : byte
    {
        /// <summary>
        /// 方式为只允许
        /// </summary>
        AllowType = 0,

        /// <summary>
        /// 方式为不允许
        /// </summary>
        UnAllowType = 1,
    }

    /// <summary>
    /// 定义一个文件上传类型校验类型的类型枚举（大小,文件类型）
    /// </summary>
    public enum FileUploadTypeValidOption : byte
    {
        /// <summary>
        /// 文件大小
        /// </summary>
        FileSize = 0,

        /// <summary>
        /// 文件类型
        /// </summary>
        FileType = 1,
    }

    /// <summary>
    /// 定义一个如果保存文件存在与服务器上时的操作选项枚举
    /// </summary>
    public enum FileUploadExistDoOption : byte
    {
        /// <summary>
        /// 抛出 FileUploadExistException
        /// </summary>
        ThrowEx = 0,

        /// <summary>
        /// 对新上传文件自动重命名
        /// </summary>
        AutoNewName = 1,

        /// <summary>
        /// 备份老文件并上传新文件
        /// </summary>
        BakAndUpload = 2,
    }
    #endregion
}
